
<div id="contentLogin">
    	<div class="addPost">
            <div class="pointerBlock dashBordBlock">
              <div class="content">
              <strong style="padding-bottom: 30px;" class="title">Разделы и категории</strong></div>
								<table>
									<tr>
									</tr>

								<% for category in @categories %>
									<tr>
										<td><b><%= category.name %></b></td>
										<%= render :partial=>"category_links", :object=>category%>
									</tr>
									<% category.childs.each do |child| %>
										<tr>
											<td style="float:right;"><%= child.name %></td>
											<%= render :partial=>"category_links", :object=>child%>
										</tr>
									<% end %>
								<% end %>
								</table>

								<p><%= link_to 'СОЗДАТЬ НОВУЮ КАТЕГОРИЮ/РАЗДЕЛ', new_category_path %></p>

							<div class="content">
              <strong style="padding-bottom: 30px;" class="title">Статьи</strong></div>
							<p><%= link_to 'СОЗДАТЬ НОВУЮ СТАТЬЮ', new_article_path %></p>
							<table>
									<tr>
									</tr>
									<% for article in @articles %>
										<tr>
											<td><%= article.title %></td>
											<td><%= link_to 'Show', article_path(article) %></td>
											<td><%= link_to 'Edit', edit_article_path(article) %></td>
											<td><%= link_to 'X', article_path(article), :confirm => 'Are you sure?', :method => :delete %></td>
										</tr>
									<% end %>
							</table>

							<div class="content">
              <strong style="padding-bottom: 30px;" class="title">Продукты</strong></div>
							<table>
									<tr>
									</tr>
									<% for article in @products %>
										<tr>
											<td><%= article.title %></td>
											<td><%= link_to 'Show', category_article_path(article.category, article) %></td>
											<td><%= link_to 'Edit', edit_category_article_path(article.category, article) %></td>
											<td><%= link_to 'X', article_path(article), :confirm => 'Are you sure?', :method => :delete %></td>
										</tr>
									<% end %>
							</table>
				</div>
    </div>
</div>
